#version 330
layout(location = 0) in vec4 position;

uniform float zNear;
uniform float zFar;
uniform float frustumScale;

void main()	{
	vec4 cameraPos = position;
	cameraPos.z -= 1.0f;
	cameraPos.y -= 1.5f;
	//cameraPos.x -= 1.0f;
	vec4 clipPos;
	clipPos.xy = cameraPos.xy * frustumScale;
	clipPos.z = cameraPos.z * (zNear + zFar) / (zNear - zFar);
	clipPos.z += 2 * zNear * zFar / (zNear - zFar);
	clipPos.w = -cameraPos.z;
	gl_Position = clipPos;
//	gl_Position = position;	
}